package net.news.action;

import java.util.List;

import javax.annotation.Resource;

import net.news.entity.News;
import net.news.entity.NewsType;
import net.news.service.NewsService;
import net.news.service.NewsTypeService;

import com.liesp.util.PropertyFilter;
import com.livesky.framework.miniapp.ActionSupport;
import com.livesky.framework.miniapp.utils.ViewUtils;

/**
 * 项目名称：cmunews3084<br>
 * 类名称：FirstPageAction <br>
 * 类描述： TODO(请输入类的描述) <br>
 * 创建人：charles 创建时间：2011-5-20 上午08:31:42 <br>
 * 修改人： 修改时间： <br>
 * 修改备注：
 * 
 * @version V1.0
 */

public class FirstPageAction extends ActionSupport {
	private List<News> newsList;
	private List<NewsType> newsTypes;
	@Resource
	private NewsService newsService;
	@Resource
	private NewsTypeService newsTypeService;

	/**后台首页
	 * @return
	 */
	public String backstage() {
//		List<PropertyFilter> filters = PropertyFilter
//				.buildFromHttpRequest(ViewUtils.getRequest());
//		newsList = newsService.getNewsByFilter(filters);
//		newsTypes = newsTypeService.getNewstype();
		return SUCCESS;
	}

	/**
	 * @return the newsList
	 */
	public List<News> getNewsList() {
		return newsList;
	}

	/**
	 * @param newsList
	 *            the newsList to set
	 */
	public void setNewsList(List<News> newsList) {
		this.newsList = newsList;
	}

	/**
	 * @return the newsTypes
	 */
	public List<NewsType> getNewsTypes() {
		return newsTypes;
	}

	/**
	 * @param newsTypes
	 *            the newsTypes to set
	 */
	public void setNewsTypes(List<NewsType> newsTypes) {
		this.newsTypes = newsTypes;
	}

}
